package com.zzq.service.impl;

import com.zzq.mapper.BidderMapper;
import com.zzq.pojo.Bidder;
import com.zzq.service.BidderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BidderServiceImpl implements BidderService {

    @Autowired
    BidderMapper bidderMapper;

    @Override
    public Bidder findByBidderName(String username) {
        Bidder bidder =bidderMapper.findByBidderName(username);
        return bidder;
    }

    @Override
    public void register(String username, String password,String companyName,String email,String address) {
        bidderMapper.add(username,password,companyName,email,address);
    }

    @Override
    public List<Bidder> list() {
        return bidderMapper.list();
    }

    @Override
    public void deleteBidder(int id) {
        bidderMapper.deleteBidder(id);
    }

    @Override
    public void enitBidder(Bidder bidder) {
        bidderMapper.enitBidder(bidder);
    }

}
